package com.just.bz_back.controller.admin;

import com.just.bz_back.model.dto.JsonData;
import com.just.bz_back.model.dto.Page;
import com.just.bz_back.service.AdminService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/api/v1/admin/user")
public class UserController {
    @Resource
    private AdminService adminService;
    @RequestMapping("/list")
    public JsonData UserList(@RequestBody Page page)
    {
        return JsonData.buildSuccess(adminService.UserList(page),"查询用户信息成功");
    }
    @RequestMapping("/listAll")
    public JsonData UserList()
    {
        return JsonData.buildSuccess(adminService.UserListAll(),"查询用户信息成功");
    }
}
